clear;
clc;

N = 1000;
for n = 1:N
    for i = 1:n
    averX = mean(1:i);    
    div(i) = (i - averX)^2;
    sum = div(1:i);
    end
end

n=1:1:N;
plot(n,sum);

